<script>
$("#cityform").validate({
                    submitHandler: function(form) {
                        $(form).ajaxSubmit({
                            target: "#municipios"
                        });
                    }
            
            
                });
</script>
<?php
echo $this->Form->create('UserCity', array('id' => 'cityform','action'=>'add/'.$user_id."/".$branch));
?>

<?php
echo $this->Ajax->observeField('UserCityDepartamentId', array(
    'url' => array('controller' => 'userCities', 'action' => 'select'),
    'frequency' => 0.2,
    'update' => 'cities'
        )
);
?>
<?php
echo $this->Form->hidden("UserCity.user_id", array('value' => $user_id));
echo $this->Form->input("UserCity.departament_id", array('label' => 'Departamento', 'empty' => 'Seleccione departamento','class'=>'required'));
?>
<div id="cities">

</div>
<?php
//echo $this->Ajax->submit('Adicionar municipio', array('url' => array('controller' => 'userCities', 'action' => 'add', $user_id), 'update' => 'ciudades', 'indicator' => 'loading'));
echo $this->Form->end('Adicionar municipio');
?>